package com.tianji.learning.controller.admin;


import com.tianji.common.domain.dto.PageDTO;
import com.tianji.learning.domain.dto.QuestionFormDTO;
import com.tianji.learning.domain.query.QuestionAdminPageQuery;
import com.tianji.learning.domain.query.QuestionPageQuery;
import com.tianji.learning.domain.vo.QuestionAdminVO;
import com.tianji.learning.domain.vo.QuestionVO;
import com.tianji.learning.service.IInteractionQuestionService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.RequiredArgsConstructor;
import org.springframework.web.bind.annotation.*;

import javax.validation.Valid;

/**
 * <p>
 * 互动提问的问题表 前端控制器
 * </p>
 *
 * @author fx
 * @since 2024-08-25
 */
@Api(tags = "互动问答-管理端-问题相关接口")
@RestController
@RequestMapping("/admin/questions")
@RequiredArgsConstructor
public class InteractionQuestionAdminController {

    private final IInteractionQuestionService questionService;


    /**
     * 01 分页查询互动问题-管理端（day05-随堂-04）
     *
     * @param pageQuery
     * @return
     */
    @ApiOperation("分页查询互动问题-管理端")
    @GetMapping("/page")
    public PageDTO<QuestionAdminVO> adminPageQueryQuestions(QuestionAdminPageQuery pageQuery) {
        return questionService.adminPageQueryQuestions(pageQuery);
    }


}
